var mongoose=require('../../cfg/dbconfig.js')

//转学学生信息模型
var transschoolcodeSchema=new mongoose.Schema({
    "expireAt":{'type':Date,index: { expires: 0 } },
    "value":String,
    "name":String
},{collection:'transschoolcode'})

transschoolcodeSchema.statics.Save=async function(doc){
    let obj=new this(doc);
    let res=await obj.save();
    return res;
}

transschoolcodeSchema.statics.getByQuery=async function(query){
    let res=await this.findOne(query).exec();
    return res;
}

module.exports=mongoose.model('transschoolcode',transschoolcodeSchema)